$(function(){
	$('#sub-btn').click(function(){
		//获取表单的数据
		var data = $('form[name=user-form]').serialize();
		$.ajax({
			url: './index.php',//请求地址
			type:'post',//传送方式
			data:data,//发送数据
			dataType:'json',//返回数据类型
			success:function(data){
				alert(data.password);
			}	
		})
	})
	// var imgUrl = "http://shoufa.sina.com.cn/charm/bd/assets/images/share.jpg";
	// var lineLink = window.location.href;
	// var descContent = '现在开始，开启你手机的眼睛，让你的所见即为所得，改变你探索世界的方式！';//'手机百度—改变搜索世界的方式';
	// var shareTitle = '改变你探索世界的方式';
	// var appid = '';
	// function shareFriend(){WeixinJSBridge.invoke("sendAppMessage",{appid:appid,img_url:imgUrl,img_width:"200",img_height:"200",link:lineLink,desc:descContent,title:shareTitle},function(a){});
	// }function shareTimeline(){WeixinJSBridge.invoke("shareTimeline",{img_url:imgUrl,img_width:"200",img_height:"200",link:lineLink,desc:descContent,title:shareTitle},function(a){});
	// }function shareWeibo(){WeixinJSBridge.invoke("shareWeibo",{content:descContent,url:lineLink,},function(a){});}document.addEventListener("WeixinJSBridgeReady",function onBridgeReady(){WeixinJSBridge.on("menu:share:appmessage",function(a){shareFriend();
	// });WeixinJSBridge.on("menu:share:timeline",function(a){shareTimeline();});WeixinJSBridge.on("menu:share:weibo",function(a){shareWeibo();});},false);
})
// <script type="text/javascript">
// var imgUrl = "http://shoufa.sina.com.cn/charm/bd/assets/images/share.jpg";
// var lineLink = window.location.href;
// var descContent = '现在开始，开启你手机的眼睛，让你的所见即为所得，改变你探索世界的方式！';//'手机百度—改变搜索世界的方式';
// var shareTitle = '改变你探索世界的方式';
// var appid = '';
// function shareFriend(){WeixinJSBridge.invoke("sendAppMessage",{appid:appid,img_url:imgUrl,img_width:"200",img_height:"200",link:lineLink,desc:descContent,title:shareTitle},function(a){});
// }function shareTimeline(){WeixinJSBridge.invoke("shareTimeline",{img_url:imgUrl,img_width:"200",img_height:"200",link:lineLink,desc:descContent,title:shareTitle},function(a){});
// }function shareWeibo(){WeixinJSBridge.invoke("shareWeibo",{content:descContent,url:lineLink,},function(a){});}document.addEventListener("WeixinJSBridgeReady",function onBridgeReady(){WeixinJSBridge.on("menu:share:appmessage",function(a){shareFriend();
// });WeixinJSBridge.on("menu:share:timeline",function(a){shareTimeline();});WeixinJSBridge.on("menu:share:weibo",function(a){shareWeibo();});},false);
// </script>